# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=asteroid
pkgname=asteroid-btsyncd
pkgver=2.0.0
pkgrel=0
pkgdesc="Bluetooth Low Energy synchronization daemon for AsteroidOS"
url="https://github.com/AsteroidOS/asteroid-btsyncd"
# armhf blocked by nemo-qml-plugin-systemsettings
arch="all !armhf"
license="GPL-3.0-or-later"
makedepends="
	extra-cmake-modules
	glibmm-dev
	nemo-qml-plugin-systemsettings-dev
	qml-asteroid-dev
	qt5-qtbase-dev
	qtmpris-dev
	samurai
	timed-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/AsteroidOS/asteroid-btsyncd/archive/refs/tags/$pkgver.tar.gz
	asteroid-btsyncd.desktop
	"
options="!check" # no tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	install -Dm644 "$srcdir"/asteroid-btsyncd.desktop -t "$pkgdir"/etc/xdg/autostart/
}

sha512sums="
b0fba66730cde57260deefb53536004ddd5746c97a2c0adfdd0c28a66c05a0d910cf1d36c188c389ae90c9bf3f37943ea7024db5ee558e432770d72ef9f8c243  asteroid-btsyncd-2.0.0.tar.gz
c6d1f3e1870c9bf0c65dc25961f58c3277149f6f7cc141bf0fd89ead191a1d9d72c3c414485f9b1b6407f066e51949b17be8eeb2473dcafb2e2bc5af1015b903  asteroid-btsyncd.desktop
"
